package com.tanhua.dubbo.server.api;

import com.tanhua.dubbo.server.pojo.Video;
import com.tanhua.dubbo.server.vo.PageInfo;

import java.util.List;

/**
 * @Author 王加鑫
 * @Date 2021/09/09 21:06
 * @Since JDK 1.8
 */
public interface VideoApi {

    /**
     * 保存小视频
     * @param video
     * @return
     */
    String saveVideo(Video video);

    /**
     * 小视频列表
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    PageInfo queryVideoList(Long userId, Integer page, Integer pageSize);

    /**
     * 查看当前视频下的评论的数量
     * 需要视频id
     */
    Long queryVideoCommentCount(String videoId);

    /**
     * 关注用户
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean followUser(Long userId, Long followUserId);

    /**
     * 取消关注用户
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean disFollowUser(Long userId, Long followUserId);

    /**
     * 查询用户是否关注某个用户
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean isFollowUser(Long userId, Long followUserId);

    /**
     * 视频记录翻页
     * @param uid
     * @return
     */
    List<Video> queryVideosList(Integer uid);
}
